package bsc.ejb.facade;

import bsc.ejb.entity.ActionPlan;
import bsc.ejb.entity.ActionPlanPerson;
import bsc.ejb.entity.Area;
import bsc.ejb.entity.Attachment;
import bsc.ejb.entity.ColorimetrySettings;
import bsc.ejb.entity.Comparator;
import bsc.ejb.entity.ComparatorDimensionalCut;
import bsc.ejb.entity.Dimension;
import bsc.ejb.entity.DimensionMember;
import bsc.ejb.entity.DimensionalCut;
import bsc.ejb.entity.DimensionalCutMember;
import bsc.ejb.entity.ScoreDomain;
import bsc.ejb.entity.Employee;
import bsc.ejb.entity.Label;
import bsc.ejb.entity.Map;
import bsc.ejb.entity.MapDrawingSettings;
import bsc.ejb.entity.Milestone;
import bsc.ejb.entity.MilestoneTracer;
import bsc.ejb.entity.Note;
import bsc.ejb.entity.Pointer;
import bsc.ejb.entity.Objective;
import bsc.ejb.entity.Settings;
import bsc.ejb.entity.Perspective;
import bsc.ejb.entity.ScoreCard;
import bsc.ejb.entity.Person;
import bsc.ejb.entity.PersonScoreCard;
import bsc.ejb.entity.PersonScoreDomain;
import bsc.ejb.entity.Project;
import bsc.ejb.entity.SRM;
import bsc.ejb.entity.SRMTopic;
import bsc.ejb.entity.ScoreCardDimension;
import bsc.ejb.entity.ScoreCardDomain;
import bsc.ejb.entity.ScoreCardRelation;
import bsc.ejb.entity.ScoreView;
import bsc.ejb.entity.Task;
import bsc.ejb.entity.Theme;
import bsc.ejb.entity.Topic;
import bsc.ejb.entity.TopicScoreView;
import bsc.ejb.entity.Tracer;
import bsc.ejb.metadata.Activity;
import bsc.ejb.metadata.Alert;
import bsc.ejb.metadata.Colorimetry;
import bsc.ejb.metadata.Comparation;
import bsc.ejb.metadata.Formula;
import bsc.ejb.metadata.Framework;
import bsc.ejb.metadata.Graph;
import bsc.ejb.metadata.Icon;
import bsc.ejb.metadata.Lang;
import bsc.ejb.metadata.License;
import bsc.ejb.metadata.MapDrawing;
import bsc.ejb.metadata.NoteType;
import bsc.ejb.metadata.Profile;
import bsc.ejb.metadata.SMTP;
import bsc.ejb.metadata.TimePeriod;
import bsc.ejb.metadata.Unit;
import java.util.Date;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author memozac
 */
@Local
public interface BSCFacadeLocal {

    /**
     * <ENTITY>
     */
    //ActionPlan
    ActionPlan findActionPlan(Long idActionPlan);

    List<ActionPlan> findActionPlan(ScoreCard scoreCard);
    // Update

    void updateActionPlan(ActionPlan actionPlan);

    // Delete
    void deleteActionPlan(ActionPlan actionPlan);

    //ActionPlanPerson
    ActionPlanPerson findActionPlanPerson(ActionPlan actionPlan, ActionPlanPerson.Profile actionPlanPersonProfile);

    // Find

    List<ActionPlanPerson> findActionPlanPerson();

    ActionPlanPerson findActionPlanPerson(Long idActionPlanPerson);

    // Create

    void createActionPlanPerson(ActionPlanPerson actionPlanPerson);

    // Update

    void updateActionPlanPerson(ActionPlanPerson actionPlanPerson);

    // Delete

    void deleteActionPlanPerson(ActionPlanPerson actionPlanPerson);

    // Area
    Area findArea(Long idArea);
    // Attachment

    Attachment findAttachment(Long idAttachment);

    List<Attachment> findAttachment(Note note);

    List<Attachment> findAttachment(ActionPlan actionPlan);
    // Comparator

    Comparator findComparator(Long idComparator);

    Comparator findComparator(Pointer pointer, Comparation comparation);

    List<Comparator> findComparator(Pointer pointer);

    List<Comparator> findComparator(DimensionalCut dimensionalCut);

    //Comparator Dimensional Cut
    ComparatorDimensionalCut findComparatorDimensionalCut(Comparator comparator, DimensionalCut dimensionalCut, Date date);

    List<ComparatorDimensionalCut> findComparatorDimensionalCut(DimensionalCut dimensionalCut);

    List<ComparatorDimensionalCut> findComparatorDimensionalCutDate(DimensionalCut dimensionalCut, Date date);

    List<Date> findComparatorDimensionalCutDate(DimensionalCut dimensionalCut);

    Double findComparatorDimensionalCut(Comparator comparator, Date firstDate, Date lastDate);

    Double findComparatorDimensionalCut(Comparator comparator, Date firstDate, Date lastDate, DimensionalCut dimensionalCut);

    // Dimension
    List<Dimension> findDimension();

    Dimension findDimension(Long idDimension);

    List<Dimension> findDimension(ScoreCard scoreCard);
    // DimensionMember

    List<DimensionMember> findDimensionMember(Boolean withBusyMembers);

    DimensionMember findDimensionMember(Long idDimensionMember);

    List<DimensionMember> findDimensionMember(Dimension dimension);

    List<DimensionMember> findDimensionMember(DimensionalCut dimensionalCut);

    List<DimensionMember> findDimensionMember(DimensionMember dimensionMember);

    List<DimensionMember> findRootDimensionMember(DimensionalCut dimensionalCut);
    // DimensionalCut

    DimensionalCut findDimensionalCut(Long idDimensionalCut);

    List<DimensionalCut> findDimensionalCut(DimensionMember dimension);

    List<DimensionalCut> findDimensionalCut(Comparator comparator);

    List<DimensionalCut> findDimensionalCut(Pointer pointer);
    // DimensionalCutMember

    List<DimensionalCutMember> findDimensionalCutMember(DimensionalCut DimensionalCut);
    // ScoreCardDimension

    ScoreCardDimension findScoreCardDimension(Long idScoreCardDimension);

    List<ScoreCardDimension> findScoreCardDimension(ScoreCard scoreCard);
    // ScoreDomain

    List<ScoreDomain> findScoreDomain();

    List<ScoreDomain> findScoreDomainSpecial(Long idScoreDomain);

    ScoreDomain findScoreDomain(Long idDomain);
    // List<ScoreDomain> findDomain(ScoreCard scoreCard);

    List<ScoreDomain> findScoreDomain(Person person);

    List<ScoreDomain> findScoreDomain(Person person, Boolean defaultDomain);

    ScoreCardDomain findScoreCardDomain(Long idScoreCardDomain);

    ScoreCardRelation findScoreCardRelation(Long idScoreCardRelation);

    ScoreCardRelation findScoreCardRelation(Long idScoreCard, Long idOtherScoreCard);
    // Employee

    Employee findEmployee(Long idEmployee);
    // Label

    Label findLabel(Long idLabel);

    List<Label> findLabel(Project project);
    // Map

    Map findMap(Long idMap);

    List<Map> findMap();
    // MapDrawingSettings

    MapDrawingSettings findMapDrawingSettings(Long idMapDrawingSettings);

    MapDrawingSettings findMapDrawingSettings(Settings settings, MapDrawing mapDrawing);

    List<MapDrawingSettings> findMapDrawingSettings(MapDrawing mapDrawing);

    List<MapDrawingSettings> findMapDrawingSettings(Settings settings);
    // Milestone

    Milestone findMilestone(Long idMilestone);

    List<Milestone> findMilestone(Project project);

    List<Milestone> findMilestone(Tracer tracer);
    // MilestoneTracer

    MilestoneTracer findMilestoneTracer(Long idMilestoneTracer);

    MilestoneTracer findMilestoneTracer(Milestone milestone, Tracer tracer);

    List<MilestoneTracer> findMilestoneTracer(Milestone milestone);
    // Note

    Note findNote(Long idNote);

    List<Note> findNote(ScoreCard scoreCard);

    List<Note> findNote(Person person);
    // Objective

    Objective findObjective(Long idObjective);
    // Person

    List<Person> findAvaliablePerson();

    List<Person> findPerson();

    Person findPerson(Long idPerson);

    List<Person> findPerson(ScoreDomain scoreDomain);

    Person findPerson(String username, String password);

    List<Person> findPerson(ScoreCard scoreCard);
    // PersonScoreCard

    PersonScoreCard findPersonScoreCard(Long idPersonScoreCard);

    PersonScoreCard findPersonScoreCard(Person person, ScoreCard scoreCard);

    List<PersonScoreCard> findPersonScoreCard(Person person);

    List<PersonScoreCard> findPersonScoreCard(ScoreCard scoreCard);
    // PersonScoreDomain

    List<PersonScoreDomain> findPersonScoreDomain(Person person);

    List<PersonScoreDomain> findPersonScoreDomain(ScoreDomain scoreDomain);

    PersonScoreDomain findPersonScoreDomain(Person person, ScoreDomain scoreDomain);
    // Perspective

    Perspective findPerspective(Long idPerspective);
    // Pointer

    Pointer findPointer(Long idPointer);
    // Project

    List<Project> findProject();

    Project findProject(Long idProject);

    List<Project> findProject(Person person);
    // SRM

    List<SRM> findSRM();

    SRM findSRM(Long idSRM);

    List<SRM> findSRM(ScoreView scoreView);

    List<SRM> findSRM(Topic topic);
    // SRMTopic

    SRMTopic findSRMTopic(Long idSRMTopic);

    List<SRMTopic> findSRMTopic(SRM SRM);

    List<SRMTopic> findSRMTopic(Topic topic);

    SRMTopic findSRMTopic(SRM SRM, Topic topic);
    // ScoreCard

    List<ScoreCard> findScoreCard();

    List<ScoreCard> findOtherScoreCards(Long idScoreCard);

    List<ScoreCard> findOtherScoreCardsRevert(Long idScoreCard);

    ScoreCard findScoreCard(Long idScoreCard);

    List<ScoreCard> findScoreCard(ScoreDomain domain);

    List<ScoreCard> findScoreCard(ScoreCard scoreCard);
    // List<ScoreCard> findScoreCard(Person person);
    // ScoreView

    List<ScoreView> findScoreView();

    ScoreView findScoreView(Long idScoreView);

    List<ScoreView> findScoreView(Topic topic);
    // Settings

    Settings findSettings(Long idSettings);
    // Task

    Task findTask(Long idTask);

    List<Task> findTask(Project project);

    List<Task> findTask(Task task);

    Task findRootTask(Project project);
    // Theme

    Theme findTheme(Long idTheme);
    // Topic

    Topic findTopic(Long idTopic);

    List<Topic> findTopic(ScoreView scoreView);

    List<Topic> findTopic(SRM SRM);

    List<Topic> findTopic(ScoreCard scoreCard);

    List<Topic> findTopicsView(ScoreView scoreView);
    // TopicScoreView

    TopicScoreView findTopicScoreView(Topic topic, ScoreView scoreView);

    List<TopicScoreView> findTopicScoreView(Topic topic);

    List<TopicScoreView> findTopicScoreView(ScoreView scoreView);

    // Tracer
    Tracer findTracer(Long idTracer);

    List<Tracer> findTracer(Project project);

    List<Tracer> findTracer(Milestone milestone);

    Tracer findTracer(Project project, Tracer.Type type);

    // create
    void createArea(Area area);

    void createAttachment(Attachment attachment);

    void createColorimetrySettings(ColorimetrySettings colorimetrySettings);

    void createComparator(Comparator comparator);

    void createComparatorDimensionalCut(ComparatorDimensionalCut comparatorDimensionalCut);

    void createDimension(Dimension dimension);

    void createDimensionMember(DimensionMember dimensionMember);

    void createDimensionalCut(DimensionalCut dimensionalCut);

    void createDimensionalCutMember(DimensionalCutMember dimensionalCutMember);

    void createEmployee(Employee employee);

    void createLabel(Label label);

    void createMap(Map map);

    void createMilestone(Milestone milestone);

    void createMilestoneTracer(MilestoneTracer milestoneTracer);

    void createNote(Note note);

    void createObjective(Objective objective);

    void createPerson(Person person);

    void createPersonScoreCard(PersonScoreCard personScoreCard);

    void createPersonScoreDomain(PersonScoreDomain personScoreDomain);

    void createPerspective(Perspective perspective);

    void createPointer(Pointer pointer);

    void createProject(Project project);

    void createSRM(SRM SRM);

    void createSRMTopic(SRMTopic SRMTopic);

    void createScoreCard(ScoreCard scoreCard);

    void createScoreCardDimension(ScoreCardDimension scoreCardDimension);

    void createScoreCardDomain(ScoreCardDomain scoreCardDomain);

    void createScoreCardRelation(ScoreCardRelation scoreCardRelation);

    void createScoreDomain(ScoreDomain domain);

    void createScoreView(ScoreView scoreView);

    void createSettings(Settings settings);

    void createTask(Task task);

    void createTheme(Theme theme);

    void createTopic(Topic topic);

    void createTopicScoreView(TopicScoreView topicScoreView);

    void createTracer(Tracer tracer);

    // update
    void updateArea(Area area);

    void updateAttachment(Attachment attachment);

    void updateColorimetrySettings(ColorimetrySettings colorimetrySettings);

    void updateComparator(Comparator comparator);

    void updateComparatorDimensionalCut(ComparatorDimensionalCut comparatorDimensionalCut);

    void updateDimension(Dimension dimension);

    void updateDimensionMember(DimensionMember dimensionMember);

    void updateDimensionalCut(DimensionalCut dimensionalCut);

    void updateDimensionalCutMember(DimensionalCutMember dimensionalCutMember);

    void updateDomain(ScoreDomain domain);

    void updateEmployee(Employee employee);

    void updateLabel(Label label);

    void updateMap(Map map);

    void updateMilestone(Milestone milestone);

    void updateMilestoneTracer(MilestoneTracer milestoneTracer);

    void updateNote(Note note);

    void updateObjective(Objective objective);

    void updatePerson(Person person);

    void updatePersonScoreCard(PersonScoreCard personScoreCard);

    void updatePersonScoreDomain(PersonScoreDomain personScoreDomain);

    void updatePerspective(Perspective perspective);

    void updatePointer(Pointer pointer);

    void updateProject(Project project);

    void updateSRM(SRM SRM);

    void updateSRMTopic(SRMTopic SRMTopic);

    void updateScoreCard(ScoreCard scoreCard);

    void updateScoreCardDimension(ScoreCardDimension scoreCardDimension);

    void updateScoreCardDomain(ScoreCardDomain scoreCardDomain);

    void updateScoreCardRelation(ScoreCardRelation scoreCardRelation);

    void updateScoreDomain(ScoreDomain scoreDomain);

    void updateScoreView(ScoreView scoreView);

    void updateSettings(Settings settings);

    void updateTask(Task task);

    void updateTheme(Theme theme);

    void updateTopic(Topic topic);

    void updateTopicScoreView(TopicScoreView topicScoreView);

    void updateTracer(Tracer tracer);

    // delete
    void deleteArea(Area area);

    void deleteAttachment(Attachment attachment);

    void deleteComparator(Comparator comparator);

    void deleteComparatorDimensionalCut(ComparatorDimensionalCut comparatorDimensionalCut);

    void deleteDimension(Dimension dimension);

    void deleteDimensionMember(DimensionMember dimensionMember);

    void deleteDimensionalCut(DimensionalCut dimensionalCut);

    void deleteDimensionalCutMember(DimensionalCutMember dimensionalCutMember);

    void deleteDomain(ScoreDomain domain);

    void deleteEmployee(Employee employee);

    void deleteLabel(Label label);

    void deleteMap(Map map);

    void deleteMilestone(Milestone milestone);

    void deleteMilestoneTracer(MilestoneTracer milestoneTracer);

    void deleteNote(Note note);

    void deleteObjective(Objective objective);

    void deletePerson(Person person);

    void deletePersonScoreCard(PersonScoreCard personScoreCard);

    void deletePersonScoreDomain(PersonScoreDomain personScoreDomain);

    void deletePerspective(Perspective perspective);

    void deletePointer(Pointer pointer);

    void deleteProject(Project project);

    void deleteSRM(SRM SRM);

    void deleteSRMTopic(SRMTopic SRMTopic);

    void deleteScoreCard(ScoreCard scoreCard);

    void deleteScoreCardDimension(ScoreCardDimension scoreCardDimension);

    void deleteScoreCardDomain(ScoreCardDomain scoreCardDomain);

    void deleteScoreCardRelation(ScoreCardRelation scoreCardRelation);

    void deleteScoreDomain(ScoreDomain scoreDomain);

    void deleteScoreView(ScoreView scoreView);

    void deleteSettings(Settings settings);

    void deleteTask(Task task);

    void deleteTheme(Theme theme);

    void deleteTopic(Topic topic);

    void deleteTopicScoreView(TopicScoreView topicScoreView);

    void deleteTracer(Tracer tracer);

    /**
     * <METADATA>
     */
    // Activity
    Activity findActivity(Long idActivity);
    // Alert

    Alert findAlert(Long idAlert);

    List<Alert> findAlert(Framework framework);
    // Colorimetry

    ColorimetrySettings findColorimetrySettings(Colorimetry colorimetry, Settings settings);

    List<ColorimetrySettings> findColorimetrySettings(ScoreCard scoreCard);

    List<ColorimetrySettings> findColorimetrySettings(Colorimetry colorimetry);

    List<ColorimetrySettings> findColorimetrySettings(Settings settings);

    Colorimetry findColorimetry(Long idColorimetry);

    List<Colorimetry> findColorimetry(Framework framework, Boolean frameworkMember);

    List<Colorimetry> findColorimetry();

    Colorimetry findColorimetry(ScoreCard scoreCard, Double score);
    // Comparation

    Comparation findComparation(Long idComparation);

    Comparation findComparation(Framework framework, Comparation.Type type);

    List<Comparation> findComparation(Framework framework, Boolean frameworkMember);
    // Formula

    Formula findFormula(Long idFormula);

    List<Formula> findFormula(Framework framework);
    // Framework

    Framework findFramework(Long idFramework);

    Framework findFramework(Boolean active);

    List<Framework> findFramework();
    // Graph

    Graph findGraph(Long idGraph);

    List<Graph> findGraph(Framework framework);
    // Icon

    Icon findIcon(Long idIcon);

    List<Icon> findIcon(Colorimetry colorimetry);
    // Lang

    Lang findLang(Long idLang);

    List<Lang> findLang(Framework framework, Boolean frameworkMember);

    List<Lang> findLang();
    // License

    License findLicense(Long idLicense);

    License findCurrentLicense();

    List<License> findLicense();
    // MapDrawing

    MapDrawing findMapDrawing(Long idMapDrawing);

    List<MapDrawing> findMapDrawing(Framework framework, Boolean frameworkMember);

    List<MapDrawing> findMapDrawing();
    // NoteType

    NoteType findNoteType(Long idNoteType);

    List<NoteType> findNoteType(Framework framework, Boolean frameworkMember);

    List<NoteType> findNoteType();
    // Profile

    Profile findProfile(Long idProfile);

    List<Profile> findProfile(Framework framework);
    // SMTP

    SMTP findSMTP(Long idSMTP);

    SMTP findSMTP(Framework framework);

    List<SMTP> findSMTP(Framework framework, Boolean frameworkMember);
    // TimePeriod

    TimePeriod findTimePeriod(Long idTimePeriod);

    List<TimePeriod> findTimePeriod(Framework framework);
    // Unit

    Unit findUnit(Long idUnit);

    List<Unit> findUnit(Framework framework, Boolean frameworkMember);

    List<Unit> findUnit();

    // create
    void createActionPlan(ActionPlan actionPlan);

    void createActivity(Activity activity);

    void createAlert(Alert alert);

    void createColorimetry(Colorimetry colorimetry);

    void createComparation(Comparation comparation);

    void createFormula(Formula formula);

    void createFramework(Framework framework);

    void createGraph(Graph graph);

    void createIcon(Icon icon);

    void createLang(Lang lang);

    void createLicense(License license);

    void createMapDrawing(MapDrawing mapDrawing);

    void createMapDrawingSettings(MapDrawingSettings mapDrawingSettings);

    void createNoteType(NoteType noteType);

    void createProfile(Profile profile);

    void createSMTP(SMTP SMTP);

    void createTimePeriod(TimePeriod timePeriod);

    void createUnit(Unit unit);

    // update
    void updateActivity(Activity activity);

    void updateAlert(Alert alert);

    void updateColorimetry(Colorimetry colorimetry);

    void updateComparation(Comparation comparation);

    void updateFormula(Formula formula);

    void updateFramework(Framework framework);

    void updateGraph(Graph graph);

    void updateIcon(Icon icon);

    void updateLang(Lang lang);

    void updateLicense(License license);

    void updateMapDrawing(MapDrawing mapDrawing);

    void updateMapDrawingSettings(MapDrawingSettings mapDrawingSettings);

    void updateNoteType(NoteType noteType);

    void updateProfile(Profile profile);

    void updateSMTP(SMTP SMTP);

    void updateTimePeriod(TimePeriod timePeriod);

    void updateUnit(Unit unit);

    // delete
    
    void deleteActivity(Activity activity);

    void deleteAlert(Alert alert);

    void deleteColorimetry(Colorimetry colorimetry);

    void deleteColorimetrySettings(ColorimetrySettings colorimetrySettings);

    void deleteComparation(Comparation comparation);

    void deleteFormula(Formula formula);

    void deleteFramework(Framework framework);

    void deleteGraph(Graph graph);

    void deleteIcon(Icon icon);

    void deleteLang(Lang lang);

    void deleteLicense(License license);

    void deleteMapDrawing(MapDrawing mapDrawing);

    void deleteMapDrawingSettings(MapDrawingSettings mapDrawingSettings);

    void deleteNoteType(NoteType noteType);

    void deleteProfile(Profile profile);

    void deleteSMTP(SMTP SMTP);

    void deleteTimePeriod(TimePeriod timePeriod);

    void deleteUnit(Unit unit);
}
